export const FULL_BOX = 'full_box';
export const MIXIN_BOX = 'mixin_box';

export const STATUS_CREATED = 'created'; // 创建 待国内接收
export const STATUS_RECEIVED = 'received'; // 运输中 国内已接收
export const STATUS_WAIT_SORTING = 'wait_sorting'; // 待分拣 国外已接收
export const STATUS_SORTED = 'sorted'; // 已分拣
export const STATUS_LISTED = 'listed'; // 已上架
export const STATUS_FULL_DELIVERED = 'full_delivered'; // 已送仓
export const STATUS_FULL_ABOLISHED = 'full_abolished'; // 已作废
export const STATUS_OFFLINE_DELIVERED = 'offline_delivered'; // 已交付

/**
 * 获取箱型
 * @param type
 * @returns {*|string}
 */
export function getBoxTypeStr(type){
  const obj = {
    [FULL_BOX]: '整箱',
    [MIXIN_BOX]: '混箱',
  }
  return obj && obj[type] || '';
}

/**
 * 获取箱唛状态
 * @param status
 * @returns {*|string}
 */
export function getBoxStatusStr(status){
  const obj = {
    [STATUS_CREATED]: '待接收',
    [STATUS_RECEIVED]: '运输中',
    [STATUS_WAIT_SORTING]: '待分拣',
    [STATUS_SORTED]: '已分拣',
    [STATUS_LISTED]: '已上架',
    [STATUS_OFFLINE_DELIVERED]: '已交付',
    [STATUS_FULL_DELIVERED]: '已送仓',
    [STATUS_FULL_ABOLISHED]: '已作废',
  }
  return obj && obj[status] || '未知';
}
